package com.lujianfei.netease_android_shareelement.ui

import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import com.lujianfei.netease_android_shareelement.R
import com.lujianfei.netease_android_shareelement.beans.ListEntity
import kotlinx.android.synthetic.main.activity_share_element_detail.*

class ShareElementDetailActivity : AppCompatActivity() {

    companion object {
        const val KEY_DATA = "key_data"
    }

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_share_element_detail)
        val bean = intent.getParcelableExtra<ListEntity>(KEY_DATA)
        bean?.let {
            detailIcon.setImageResource(bean.icon)
            detailTitle.text = bean.title
        }
    }
}
